Skip to content

test(web-ui): expose stable DOM locators for OH UI automation - #1295

Merged
GCWing merged 13 commits into
GCWing:mainfrom
SWangHash:pr/ztx0609-testids-gcwing-main
Jun 24, 2026
Merged

test(web-ui): expose stable DOM locators for OH UI automation#1295
GCWing merged 13 commits into
GCWing:mainfrom
SWangHash:pr/ztx0609-testids-gcwing-main

Conversation

@azi44eo

@azi44eo azi44eo commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary
Add stable data-testid and data-* coverage across the Web UI so OH UI automation can target real interactive elements instead of relying on class names, DOM structure, or localized text.

This PR mainly covers:

  • Flow Chat and session message surfaces
  • tool result cards for shell / file change / MiniApp / thinking
  • model selector and model configuration flows
  • Settings -> Appearance font persistence flow
  • shell / terminal / browser / navigation / agents / skills / welcome entry points
  • explore-group locators needed for collapsed command-result navigation

It also ports the locator set onto the current gcwing/main UI structure and resolves upstream merge conflicts without changing the intended product workflows.

Type and Areas
Type:

test / UI automation / UI/UX / integration

Areas:

web UI, Flow Chat, Settings, navigation, shell/terminal, agents/skills

Motivation / Impact
Our OH automation stack drives BitFun through ArkWeb DevTools / CDP and depends on stable DOM locators. Before this change, several important paths still depended on brittle selectors such as class names, structure-only traversal, or visible text.

This PR makes the following flows much more stable:

  • session startup and app shell smoke paths
  • Settings -> Appearance font preset persistence checks
  • model configuration and mock LLM setup flows
  • chat model selection
  • shell command / file change / MiniApp / thinking result assertions
  • shell / browser / terminal panel entry and state checks

Most changes are locator exposure only. A small number of wrapper nodes, prop passthroughs, and read-only data-* state attributes were added where needed to anchor the real rendered or clickable node without changing the underlying product behavior.

Verification
pnpm run type-check:web
pnpm run lint:web

Reviewer Notes
This PR is focused on stable UI automation locators and state attributes for OH E2E coverage.

It does not intentionally change tool execution, session flow, model behavior, persistence logic, or backend business logic. Where the current UI structure on gcwing/main differed from the original branch, the integration kept upstream behavior and only re-applied the locator layer.

One MiniApp result parsing change was narrowed before finalizing the branch so the UI no longer adds extra front-end normalization beyond direct string file lists and the existing fallback path.

AI-assisted: yes. Testing level: focused Web UI lint and type-check.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

@azi44eo azi44eo changed the title Pr/ztx0609 testids gcwing main test(web-ui): expose stable DOM locators for OH UI automation Jun 23, 2026
@GCWing
GCWing requested a review from limityan June 23, 2026 12:47
@GCWing
GCWing merged commit 0dd0067 into GCWing:main Jun 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants